package y23.Oct;
class People{
    private String name;
    private int age;
    private double weight;
    private double height;
    private String hobby;

    public People() {
    }

    public People(String name, int age, double weight, double height) {
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.height = height;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    @Override
    public String toString() {
        return "姓名：" + name + '\n' +
                "年龄：" + age + '\n' +
                "体重：" + weight + '\n' +
                "身高：" + height + '\n' +
                "爱好:" + hobby;
    }
}

public class Test31 {
    public static void main(String[] args) {
        People people = new People("骆天齐",19,80,1.75);
        people.setHobby("打游戏");
        System.out.println(people.toString());
    }
}
